import { WeaDialog } from "ecCom";
import { observer } from "mobx-react";
import * as React from "react";

@observer
export default class Dialog extends React.Component {
    render() {
        const { dialog, className, style } = this.props;
        return (
            <WeaDialog
                visible={dialog.visible}
                onCancel={dialog.hide}
                //moduleName={dialog.moduleName}
                icon={"icon-coms02-Data-center"}
                iconBgcolor="#1a57a0"
                title={dialog.title}
                draggable={dialog.draggable}
                style={{ ...style, ...dialog.style }}
                buttons={dialog.buttons}
                className={className}
                hasScroll={dialog.hasScroll}
            >
                {this.props.children}
            </WeaDialog>
        )
    }
}
